import request from "@/utils/request";

// 查询施工队伍列表
export function listBattalion(query) {
  return request({
    url: '/labour/battalion/list',
    method: 'get',
    params: query
  })
}

// 查询施工队伍下拉列表
export function dropDownList(query) {
  return request({
    url: '/labour/battalion/dropDownList',
    method: 'get',
    params: query
  })
}

// 新增施工队伍
export function addBattalion(data) {
  return request({
    url: '/labour/battalion',
    method: 'post',
    data: data
  })
}

// 查询施工队伍详细
export function getBattalion(battalionId) {
  return request({
    url: '/labour/battalion/' + battalionId,
    method: 'get'
  })
}

// 修改施工队伍
export function updateBattalion(data) {
  return request({
    url: '/labour/battalion',
    method: 'put',
    data: data
  })
}

// 删除施工队伍
export function delBattalion(battalionId) {
  return request({
    url: '/labour/battalion/' + battalionId,
    method: 'delete'
  })
}

// 下载施工队伍班组导入模板
export function downloadTemplate() {
  return request({
    url: '/labour/battalion/downloadTemplate',
    method: 'get'
  })
}
